home *** CD-ROM | disk | FTP | other *** search
- How to create suntar.dump and suntar.uu
-
- A disk dump may be created by the "Save sectors" command. Conceptually,
- you could save all the sectors in the disk (from sector 0 to 2879 if
- it's a 1440K) but it's better to save space by saving only what is
- necessary:
- a) a deleted file may still occupy space in the dump file, hence it's
- better to dump a disk which was formatted just before filling it
- b) the public domain utility "1430K free" may save 20 extra Kilobytes
- (we've used it since suntar1.1.uu)
- c) on our first attempt we searched the first unused sector by View sector,
- but from the second time we've used this routine:
-
- unsigned short buffer[256];
- long l;
- read_one_sector(2,buffer);
- if(err_code || buffer[0]!= 0x4244) exit(0); /* only HFS has a bitmap */
- l= buffer[9]; /* number of allocation blocks */
- read_one_sector(3,buffer); /* the first sector of the bitmap (the
- only sector of the bitmap in a volume with no more then 4100 sectors) */
- do
- l--;
- while(! BitTst(buffer,l));
- l += 5;
- printf("First unused sector:%ld\n",l);
-
- d) do a Save sector from 1 to the last used sector: that's the .dump file
-
- Finally, use any uuencoder to build the .uu file
-